// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store/index'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import {router} from './router'
import './style/login.css'
import './style/bootstrap.scss'
import message from './util/message/message'
import './style/markdown.css'
import './style/homeIndex.css'
import moment from 'moment'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
Vue.config.productionTip = false
Vue.use(mavonEditor)
Vue.use(ElementUI)
// 全局注册方法
Vue.prototype.$message = message

Vue.filter('datefmt', function (input) {
  if (!input) {
    return '暂无时间信息'
  }
  return moment(input).format('YYYY-MM-DD')
})

const vm = new Vue({
  el: '#app',
  render: h => h(App),
  router,
  store,
  components: { App },
  template: '<App/>'
})
export default vm
